using System.Windows.Forms;
using pub.CmdUI.Cmd;
using pub.CmdUI.UI.Control;

namespace todo.Cmd.Edit
{
    public class AddAfterCmd : AddBeforeCmd, ICmdState
    {
        bool ICmdState.Enabled
        {
            get { return !(TodoApi.Instance.IsEditing() ?? false); }
        }

        public AddAfterCmd()
        {
            Shortcut = new CmdShortcut(Keys.Shift | Keys.Insert);
        }

        public override void Execute(IControlUI controlUi)
        {
            TodoApi.Instance.AddAfter();
        }
    }
}